3.10.94 \(\int \frac {(A+B x) (d+e x)^2}{b x+c x^2} \, dx\)

Optimal. Leaf size=77 \[ \frac {(b B-A c) (c d-b e)^2 \log (b+c x)}{b c^3}+\frac {e x (A c e-b B e+2 B c d)}{c^2}+\frac {A d^2 \log (x)}{b}+\frac {B e^2 x^2}{2 c} \]

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.042, Rules used = {771} \begin {gather*} \frac {e x (A c e-b B e+2 B c d)}{c^2}+\frac {(b B-A c) (c d-b e)^2 \log (b+c x)}{b c^3}+\frac {A d^2 \log (x)}{b}+\frac {B e^2 x^2}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(d + e*x)^2)/(b*x + c*x^2),x]

[Out]

(e*(2*B*c*d - b*B*e + A*c*e)*x)/c^2 + (B*e^2*x^2)/(2*c) + (A*d^2*Log[x])/b + ((b*B - A*c)*(c*d - b*e)^2*Log[b
+ c*x])/(b*c^3)

Rule 771

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> In
t[ExpandIntegrand[(d + e*x)^m*(f + g*x)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && N
eQ[b^2 - 4*a*c, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

\begin {align*} \int \frac {(A+B x) (d+e x)^2}{b x+c x^2} \, dx &=\int \left (\frac {e (2 B c d-b B e+A c e)}{c^2}+\frac {A d^2}{b x}+\frac {B e^2 x}{c}+\frac {(b B-A c) (-c d+b e)^2}{b c^2 (b+c x)}\right ) \, dx\\ &=\frac {e (2 B c d-b B e+A c e) x}{c^2}+\frac {B e^2 x^2}{2 c}+\frac {A d^2 \log (x)}{b}+\frac {(b B-A c) (c d-b e)^2 \log (b+c x)}{b c^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 74, normalized size = 0.96 \begin {gather*} \frac {b c e x (2 A c e+B (-2 b e+4 c d+c e x))+2 (b B-A c) (c d-b e)^2 \log (b+c x)+2 A c^3 d^2 \log (x)}{2 b c^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*(d + e*x)^2)/(b*x + c*x^2),x]

[Out]

(b*c*e*x*(2*A*c*e + B*(4*c*d - 2*b*e + c*e*x)) + 2*A*c^3*d^2*Log[x] + 2*(b*B - A*c)*(c*d - b*e)^2*Log[b + c*x]
)/(2*b*c^3)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(A+B x) (d+e x)^2}{b x+c x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((A + B*x)*(d + e*x)^2)/(b*x + c*x^2),x]

[Out]

IntegrateAlgebraic[((A + B*x)*(d + e*x)^2)/(b*x + c*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 125, normalized size = 1.62 \begin {gather*} \frac {B b c^{2} e^{2} x^{2} + 2 \, A c^{3} d^{2} \log \relax (x) + 2 \, {\left (2 \, B b c^{2} d e - {\left (B b^{2} c - A b c^{2}\right )} e^{2}\right )} x + 2 \, {\left ({\left (B b c^{2} - A c^{3}\right )} d^{2} - 2 \, {\left (B b^{2} c - A b c^{2}\right )} d e + {\left (B b^{3} - A b^{2} c\right )} e^{2}\right )} \log \left (c x + b\right )}{2 \, b c^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)^2/(c*x^2+b*x),x, algorithm="fricas")

[Out]

1/2*(B*b*c^2*e^2*x^2 + 2*A*c^3*d^2*log(x) + 2*(2*B*b*c^2*d*e - (B*b^2*c - A*b*c^2)*e^2)*x + 2*((B*b*c^2 - A*c^
3)*d^2 - 2*(B*b^2*c - A*b*c^2)*d*e + (B*b^3 - A*b^2*c)*e^2)*log(c*x + b))/(b*c^3)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 117, normalized size = 1.52 \begin {gather*} \frac {A d^{2} \log \left ({\left | x \right |}\right )}{b} + \frac {B c x^{2} e^{2} + 4 \, B c d x e - 2 \, B b x e^{2} + 2 \, A c x e^{2}}{2 \, c^{2}} + \frac {{\left (B b c^{2} d^{2} - A c^{3} d^{2} - 2 \, B b^{2} c d e + 2 \, A b c^{2} d e + B b^{3} e^{2} - A b^{2} c e^{2}\right )} \log \left ({\left | c x + b \right |}\right )}{b c^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)^2/(c*x^2+b*x),x, algorithm="giac")

[Out]

A*d^2*log(abs(x))/b + 1/2*(B*c*x^2*e^2 + 4*B*c*d*x*e - 2*B*b*x*e^2 + 2*A*c*x*e^2)/c^2 + (B*b*c^2*d^2 - A*c^3*d
^2 - 2*B*b^2*c*d*e + 2*A*b*c^2*d*e + B*b^3*e^2 - A*b^2*c*e^2)*log(abs(c*x + b))/(b*c^3)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 144, normalized size = 1.87 \begin {gather*} \frac {B \,e^{2} x^{2}}{2 c}-\frac {A b \,e^{2} \ln \left (c x +b \right )}{c^{2}}+\frac {A \,d^{2} \ln \relax (x )}{b}-\frac {A \,d^{2} \ln \left (c x +b \right )}{b}+\frac {2 A d e \ln \left (c x +b \right )}{c}+\frac {A \,e^{2} x}{c}+\frac {B \,b^{2} e^{2} \ln \left (c x +b \right )}{c^{3}}-\frac {2 B b d e \ln \left (c x +b \right )}{c^{2}}-\frac {B b \,e^{2} x}{c^{2}}+\frac {B \,d^{2} \ln \left (c x +b \right )}{c}+\frac {2 B d e x}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(e*x+d)^2/(c*x^2+b*x),x)

[Out]

1/2*B*e^2*x^2/c+1/c*e^2*A*x-1/c^2*e^2*B*b*x+2/c*e*B*d*x-b/c^2*ln(c*x+b)*A*e^2+2/c*ln(c*x+b)*A*d*e-1/b*ln(c*x+b
)*A*d^2+b^2/c^3*ln(c*x+b)*B*e^2-2*b/c^2*ln(c*x+b)*B*d*e+1/c*ln(c*x+b)*B*d^2+A*d^2*ln(x)/b

________________________________________________________________________________________

maxima [A]  time = 0.59, size = 115, normalized size = 1.49 \begin {gather*} \frac {A d^{2} \log \relax (x)}{b} + \frac {B c e^{2} x^{2} + 2 \, {\left (2 \, B c d e - {\left (B b - A c\right )} e^{2}\right )} x}{2 \, c^{2}} + \frac {{\left ({\left (B b c^{2} - A c^{3}\right )} d^{2} - 2 \, {\left (B b^{2} c - A b c^{2}\right )} d e + {\left (B b^{3} - A b^{2} c\right )} e^{2}\right )} \log \left (c x + b\right )}{b c^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)^2/(c*x^2+b*x),x, algorithm="maxima")

[Out]

A*d^2*log(x)/b + 1/2*(B*c*e^2*x^2 + 2*(2*B*c*d*e - (B*b - A*c)*e^2)*x)/c^2 + ((B*b*c^2 - A*c^3)*d^2 - 2*(B*b^2
*c - A*b*c^2)*d*e + (B*b^3 - A*b^2*c)*e^2)*log(c*x + b)/(b*c^3)

________________________________________________________________________________________

mupad [B]  time = 0.19, size = 122, normalized size = 1.58 \begin {gather*} x\,\left (\frac {A\,e^2+2\,B\,d\,e}{c}-\frac {B\,b\,e^2}{c^2}\right )-\ln \left (b+c\,x\right )\,\left (\frac {A\,d^2}{b}-\frac {c^2\,\left (B\,b\,d^2+2\,A\,b\,e\,d\right )-c\,\left (A\,b^2\,e^2+2\,B\,d\,b^2\,e\right )+B\,b^3\,e^2}{b\,c^3}\right )+\frac {A\,d^2\,\ln \relax (x)}{b}+\frac {B\,e^2\,x^2}{2\,c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(d + e*x)^2)/(b*x + c*x^2),x)

[Out]

x*((A*e^2 + 2*B*d*e)/c - (B*b*e^2)/c^2) - log(b + c*x)*((A*d^2)/b - (c^2*(B*b*d^2 + 2*A*b*d*e) - c*(A*b^2*e^2
+ 2*B*b^2*d*e) + B*b^3*e^2)/(b*c^3)) + (A*d^2*log(x))/b + (B*e^2*x^2)/(2*c)

________________________________________________________________________________________

sympy [B]  time = 2.80, size = 163, normalized size = 2.12 \begin {gather*} \frac {A d^{2} \log {\relax (x )}}{b} + \frac {B e^{2} x^{2}}{2 c} + x \left (\frac {A e^{2}}{c} - \frac {B b e^{2}}{c^{2}} + \frac {2 B d e}{c}\right ) + \frac {\left (- A c + B b\right ) \left (b e - c d\right )^{2} \log {\left (x + \frac {- A b c^{2} d^{2} + \frac {b \left (- A c + B b\right ) \left (b e - c d\right )^{2}}{c}}{- A b^{2} c e^{2} + 2 A b c^{2} d e - 2 A c^{3} d^{2} + B b^{3} e^{2} - 2 B b^{2} c d e + B b c^{2} d^{2}} \right )}}{b c^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(e*x+d)**2/(c*x**2+b*x),x)

[Out]

A*d**2*log(x)/b + B*e**2*x**2/(2*c) + x*(A*e**2/c - B*b*e**2/c**2 + 2*B*d*e/c) + (-A*c + B*b)*(b*e - c*d)**2*l
og(x + (-A*b*c**2*d**2 + b*(-A*c + B*b)*(b*e - c*d)**2/c)/(-A*b**2*c*e**2 + 2*A*b*c**2*d*e - 2*A*c**3*d**2 + B
*b**3*e**2 - 2*B*b**2*c*d*e + B*b*c**2*d**2))/(b*c**3)

________________________________________________________________________________________